<template>
  <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <!-- <el-form-item label="单据类型">
      <el-select v-model="formInline.lngflowreceiptid" clearable placeholder="请选择" style="width:100px">
        <el-option v-for="item in receiptTypeList" :key="item.lngflowreceiptid" :label="item.strreceiptname" :value="item.lngflowreceiptid" />
      </el-select>
    </el-form-item> -->
    <!-- <el-form-item label="部署id">
      <el-input v-model="formInline.strtemplatename" placeholder="请输入" />
    </el-form-item> -->
    <el-form-item label="流程名称">
      <el-input v-model="formInline.name" placeholder="请输入" />
    </el-form-item>
    <el-form-item v-if="false" label="单据模板">
      <el-select
        v-model="formInline.lngworkflowtemplateid"
        placeholder="请选择"
        style="width:150px"
        clearable
      >
        <el-option
          v-for="(item,index) in templateList"
          :key="index"
          :label="item.strworkflowtemplatename"
          :value="item.lngworkflowtemplateid"
        />
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
</template>
<script>
import { getTemplate } from '@/api/system/approval-flow/approval-type'
export default {
  name: 'FilterTool',
  data() {
    return {
      formInline: {
        name: '',
        lngworkflowtemplateid: ''
      },
      templateList: []
    }
  },
  created() {
    this.getTemplate()
  },
  methods: {
    onSubmit() {
      this.$emit('search', this.formInline)
    },
    getTemplate() {
      getTemplate().then(res => {
        this.templateList = res
      })
    }

  }
}
</script>

